<div class="main-content">
	<div class="breadcrumbs" id="breadcrumbs">
		<ul class="breadcrumb">
			<li>
				<i class="icon-home home-icon"></i>
				<a href="#">系统首页</a>
			</li>
			<li class="active">
				设备管理
			</li>
            <li>
				<a href="#">设备列表</a>
			</li>
            <li class="active">
				查看
			</li>
		</ul><!-- .breadcrumb -->
	</div>
	<div class="page-content">
        
        <div class="page-header">
			<h1>查看设备详细信息</h1>
		</div>
		<div class="row">
			 <div class="col-xs-12">
				<!-- PAGE CONTENT BEGINS -->
				    	<table class="table table-striped table-bordered table-hover">
				    		<?php
				    			if(!empty($result) && count($result)>0){
				    				foreach($result as $val){	
				    			
				    		?>
                            	<tr>
                                	<td style="width: 7%;" class="text_rt">
                                    	<p>姓名:</p>
                                    </td>
									<td style="width: 18%;">
										<p><?php echo $val->card_name; ?></p>
                                    </td>
                                    <td style="width: 7%;" class="text_rt">
                                    	<p>身份证号:</p>
                                    </td>
                                    <td style="width: 18%;">
                                    	<p><?php echo $val->card_name; ?></p>	
                                    </td>
                                    <td style="width: 7%;" class="text_rt">
                                    	<p>性别:</p>
                                    </td>
                                    <td style="width: 18%;" >
                                    	<p><?php echo $val->sex; ?></p>	
                                    </td>
                                    <td style="width: 7%;" rowspan="3" class="align_middle">头像:</td>    
                                    <td style="width: 18%;" rowspan="3" class="align_middle">
                                    	<div style="width: 50%; margin: auto;">
                                    	<?php if (!empty($val->user_headpic)){?>
                                    		<img style="width: 100%;" src="<?php echo $val->user_headpic; ?>" />
                                    	<?php }?>
                                    	</div>             
                                    </td>
                                </tr>
                                <tr>
									<td class="text_rt">
                                    	<p>电话:</p>
                                    </td>
                                    <td>
                                    	<p><?php echo $val->login_name; ?></p>	
                                    </td>
                                    <td class="text_rt">
                                    	<p>昵称:</p>
                                    </td>
                                    <td>
                                    	<p><?php echo $val->user_name; ?></p>	
                                    </td>
                                    <td class="text_rt">
                                    	<p>
                                            	角色状态:
                                        </p>
                                    </td>
                                    <td>
                                    	<p><?php 
											if($val->role_type == 1){
		                                		echo "客户";
		                                	}elseif($val->role_type == 2){
		                                		echo "机主";
		                                	}
										 ?></p>
                                    </td>

                                </tr>
                                <tr>
									<td class="text_rt">
                                    	<p>行业:</p>
                                    </td>
                                    <td >
										<p><?php echo $val->work_type; ?></p>
                                    </td>
                                    <td class="text_rt">
                                    	<p>状态:</p>
                                    </td>
                                    <td>
                                    	<p><?php 
											if($val->user_status == 0){
		                                		echo "未实名认证";
		                                	}elseif($val->user_status == 1){
		                                		echo "已提交，认证中";
		                                	}elseif($val->user_status == 2){
		                                		echo "认证通过";
		                                	}
										 ?></p>
                                    </td>
                                    <td class="text_rt">
                                    	<p>注册时间:</p>
                                    </td>
                                    <td>
                                    	<p><?php echo $val->user_time; ?></p>
                                    </td>
                                </tr>
                                <tr>
									<td class="text_rt">
                                    	<p>编码:</p>
                                    </td>
                                    <td >
										<p><?php echo $val->device_no; ?></p>
                                    </td>
                                    <td class="text_rt">
                                    	<p>类型:</p>
                                    </td>
                                    <td>
                                    	<p><?php echo $val->category_name.'/'.$val->type_name; ?></p>
                                    </td>
                                    <td class="text_rt">
                                    	<p>品牌:</p>
                                    </td>
                                    <td>
                                    	<p><?php echo $val->brand; ?></p>
                                    </td>
                                     <td class="text_rt">
                                    	<p>型号:</p>
                                    </td>
                                    <td>
                                    	<p><?php echo $val->model; ?></p>
                                    </td>
                                </tr>
                                <tr>
									<td class="text_rt">
                                    	<p>出厂日期:</p>
                                    </td>
                                    <td>
										<p><?php echo $val->out_year; ?></p>
                                    </td>
                                    <td class="text_rt">
                                    	<p>设备状态:</p>
                                    </td>
                                    <td >
										<p><?php 
										if($val->status == 0){
											echo "未审核";
										}elseif($val->status == 1){
											echo "已审核";
										}elseif($val->status == 2){
											echo "审核不通过";
										}
										?></p>
                                    </td>
                                    <td class="text_rt">
                                    	<p>租赁价格:</p>
                                    </td>
                                    <td>
                                    	<p><?php echo $val->price; ?></p>
                                    </td>
                                     <td class="text_rt">
                                    	<p>合格证:</p>
                                    </td>
                                    <td>
                                    	<p><?php echo $val->cer_number; ?></p>
                                    </td>
                                </tr>
                                 <tr>
									<td class="text_rt">
                                    	<p>施工范围:</p>
                                    </td>
                                    <td>
                                    	<?php 
                                    		if(!empty($val->device_position)){
                                    			foreach($val->device_position as $device_val){
                                    				echo "<p>".$device_val->province_name.$device_val->city_name.$device_val->area_name."</p>";
                                    			}
                                    		}	
                                    	?>
                                    </td>
                                    <td class="text_rt">
                                    	<p>添加时间:</p>
                                    </td>
                                    <td>
                                    	<p><?php echo $val->create_time; ?></p>
                                    </td>
                                    <td class="text_rt">
                                    	<p>审核人:</p>
                                    </td>
                                    <td>
                                    	<p><?php echo $val->admin_name; ?></p>
                                    </td>
                                     <td class="text_rt">
                                    	<p>审核时间:</p>
                                    </td>
                                    <td>
                                    	<p><?php echo $val->update_time; ?></p>
                                    </td>
                                </tr>
                                <tr>
                                	<td class="text_rt"><p>业务员:</p></td>
                                	<td>
                                	<p><?php echo $val->service_admin; ?></p>
                                	</td>
                                	<td colspan="6"></td>
                                </tr>
                                <tr>
                                	<td class="text_rt"><p>行驶证:</p></td>
                                    <td colspan="3">
                                    	<div style="width:50%; margin: auto;">
                                    	<?php if (!empty($val->driving_license)){?>
                                    		<img style="width: 100%;" src="<?php echo $val->driving_license; ?>" />
                                    	<?php }?>
                                    	</div>
                                   </td>
                                   <td class="text_rt"><p>驾驶证:</p></td>
                                    <td colspan="3">
                                    	<div style="width:50%; margin: auto;">
                                    	<?php if (!empty($val->driver_license)){?>
                                    		<img style="width: 100%;" src="<?php echo $val->driver_license; ?>" />
                                    	<?php }?>
                                    	</div>
                                    </td>
                                </tr>
                                <tr>
                                	<td class="text_rt"><p>设备照片:</p></td>
                                    <td colspan="3">
                                    	<div style="width:50%; margin: auto;">
                                    	<?php if (!empty($val->headpic)){?>
                                    		<img style="width: 100%;" src="<?php echo $val->headpic; ?>" />
                                    	<?php }?>
                                    	</div>
                                   </td>
                                   <td class="text_rt"><p>设备合格证:</p></td>
                                    <td colspan="3">
                                    	<div style="width:50%; margin: auto;">
                                    	<?php if (!empty($val->cerpic)){?>
                                    		<img style="width: 100%;" src="<?php echo $val->cerpic; ?>" />
                                    	<?php }?>
                                    	</div>
                                    </td>
                                </tr>
                             <?php
                             	}}	
                             ?>
                            </table>
		            <div class="clearfix form-actions">
						<div class="col-md-offset-3 col-md-9">
							&nbsp; &nbsp; &nbsp;
							<a class="btn" href="<?php echo base_url()."admin/device/index"?>">
								<i class="icon-undo bigger-110"></i>
								返回
							</a>
						</div>
					</div>
			</div>
		</div><!-- /.row -->
	</div><!-- /.page-content -->
</div><!-- /.main-content -->
				<script type="text/javascript">
	$("#usrform").validation();
	//保存
	$("#btnSubmit").on('click',function(event){
	  // 2.最后要调用 valid()方法。
	  if ($("#usrform").valid()==false){
	    return false;
	  }
	});
	</script>